From: Florian Müllner Date: Thu, 9 Apr 2015 16:44:50 +0000 (+0200) Subject: telepathyClient: Fix removal of timestamp timeout source X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1388 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2c12f3a5092568d2a731cf55ae446e45e592815a;p=gnome-shell.git telepathyClient: Fix removal of timestamp timeout source Timestamps were always handled by the notification rather than the source, so that code never worked. --- diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index 38b534782..1ad35423b 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -474,9 +474,6 @@ const ChatSource = new Lang.Class({ this._contact.disconnect(this._notifyAvatarId); this._contact.disconnect(this._presenceChangedId); - if (this._timestampTimeoutId) - Mainloop.source_remove(this._timestampTimeoutId); - this.parent(reason); }, @@ -604,6 +601,13 @@ const ChatNotification = new Lang.Class({ this._timestampTimeoutId = 0; }, + destroy: function(reason) { + if (this._timestampTimeoutId) + Mainloop.source_remove(this._timestampTimeoutId); + this._timestampTimeoutId = 0; + this.parent(reason); + }, + /** * appendMessage: * @message: An object with the properties: @@ -686,6 +690,7 @@ const ChatNotification = new Lang.Class({ // Reset the old message timeout if (this._timestampTimeoutId) Mainloop.source_remove(this._timestampTimeoutId); + this._timestampTimeoutId = 0; let message = { realMessage: props.group != 'meta', showTimestamp: false };